package GameStates;

import GameFiles.StateBase;
import Gui.GameFrame;
import Gui.Dialogs.GameOverStatsDialog;

public class GameOver extends StateBase {

	private static GameOver ref = null;

	/*
	 * Some Variables
	 */

	private GameOver() {

	}

	public void destroy() {
	}

	public static GameOver GetInstance() {
		if (ref == null) {
			ref = new GameOver();
		}
		return ref;
	}

	/*
	 * Render States (non-Javadoc)
	 * 
	 * @see GameFiles.StateBase#Draw(java.awt.Graphics)
	 */
	@Override
	public boolean Draw(GameFrame gf) {
		// TODO Change the magic numbers
		// Render some text

//		g.drawString(m_Title, -5, 8);
//		int y = 5;
//		for (Integer x = 0; x < Defines.OO.getNumberOfPlayers(); x++) {
//			Integer total = Defines.PLM.getPlayerList().get(x).getCash()
//					- Defines.PLM.getPlayerList().get(x).getLoan();
//			// _itoa(x,m_cPlayer,10);
//			m_cPlayer = x.toString();
//			// _itoa(total,m_cCash,10);
//			m_cCash = total.toString();
//			// Player: x Cash: (cash)
//			// GOM->Render_Glut_String(m_Player, -9, y);
//			g.drawString(m_Player, -9, y);
//			// GOM->Render_Glut_String(m_cPlayer, -4, y);
//			g.drawString(m_cPlayer, -4, y);
//			// GOM->Render_Glut_String(m_Cash, -1, y);
//			g.drawString(m_Cash, -1, y);
//			// GOM->Render_Glut_String(m_cCash, 2, y);
//			g.drawString(m_cCash, 2, y);
//			y -= 3;
//		}
		@SuppressWarnings("unused")
		GameOverStatsDialog showDialog = new GameOverStatsDialog();
		return true;
	}

	/*
	 * Logic States (non-Javadoc)
	 * 
	 * @see GameFiles.StateBase#Enter()
	 */
	@Override
	public boolean Enter() {
		// TODO
		// no need for clean up since java garbage collects, maybe make a new
		// window asking if they want to play again?
		// system("cls");
		return true;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see GameFiles.StateBase#Execute()
	 */
	@Override
	public boolean Execute() {
		return true;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see GameFiles.StateBase#Exit()
	 */
	@Override
	public boolean Exit() {
		return true;
	}

}
